1. Technical Field
Embodiments of the present invention relate to a database technique, and more particularly to an information processor, an information processing system, a data archiving method, and a data deletion method which enable efficient deletion of data from a database.
2. Discussion
Public offices and enterprises have large-scale database systems built therein for managing vast amounts of data generated in various kinds of activities. In such a large-scale database system, a huge amount of data is generated and stored every day, and therefore, it is operationally common that less important data in a predetermined range is archived on a regular or irregular basis and, further, the data that is no longer necessary is deleted from the database. When data on the order of tens of thousands of, hundreds of thousands of, or even millions of records is to be processed in the data deletion or archiving process, it takes some time to complete the processing, with a heavy load placed on the system.
In a database, various types of transaction isolation levels have been provided to improve a wait state occurring while a plurality of processes are performed concurrently. During the deletion or archiving process described above, the following malfunctions may occur depending on the transaction isolation levels.
Specifically, a low transaction isolation level may lead to a malfunction in which an application is able to refer to target data until the deletion process or the archiving process is completed. It is desirable that archived data is not referred to by any application except the application that is performing the archiving process from the start point of the archiving process, and it is also desirable that deleted data is not referred to by any application from the time point of deletion thereof. Furthermore, the fact that another application can refer to the archived target data will lead to degraded performance of that application when referring to data.
On the other hand, a high transaction isolation level may lead to a malfunction in which, when another application refers to data of the deletion target that is being deleted, the application may wait for unlocking, with no response, until the deletion process is completed. Further, in the archiving process, a deletion process is performed following the retrieval of data, causing the similar malfunction to occur during the deletion process. Furthermore, the retrieval of data for archiving also requires much time and imposes a heavy load, and thus, there also is a demand for an archiving method which does not impose a load on a production database.
Still further, in a database, for the need of lock control, the amount of memory usage increases in accordance with the number of target records. When the amount of memory used for the lock control reaches the greatest amount of memory usage that can be set, lock escalation takes place, which switches per-record locks to a full-table lock. With the full-table lock, data in the table other than the target data is locked as well. In this case, another application process may have to wait until the lock is released, in some transaction isolation levels, even in the case of referring to data other than the target data.